package com.example.questionnaire.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.common.utils.PageUtils;
import com.example.common.utils.Query;

import com.example.questionnaire.dao.AnswererQuestionnaireDao;
import com.example.questionnaire.entity.AnswererQuestionnaireEntity;
import com.example.questionnaire.service.AnswererQuestionnaireService;


@Service("answererQuestionnaireService")
public class AnswererQuestionnaireServiceImpl extends ServiceImpl<AnswererQuestionnaireDao, AnswererQuestionnaireEntity> implements AnswererQuestionnaireService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<AnswererQuestionnaireEntity> page = this.page(
                new Query<AnswererQuestionnaireEntity>().getPage(params),
                new QueryWrapper<AnswererQuestionnaireEntity>()
        );
        page.setTotal(page.getRecords().size());

        return new PageUtils(page);
    }

}